package com.wuiy.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.wuiy.fragment.EnviorFragment;
import com.wuiy.indexdemo.R;


public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void environment(View view) {
        EnviorFragment enviorFragment =new EnviorFragment();
        android.app.FragmentManager fragmentManager =getFragmentManager();
        android.app.FragmentTransaction fragmentTransaction =fragmentManager.beginTransaction();
        fragmentTransaction.replace(R.id.fragment_content, enviorFragment);
        fragmentTransaction.commit();
    }

    /*public void history(View view) {
        HistoryFragment historyFragment=new HistoryFragment();
        FragmentManager fragmentManager=getSupportFragmentManager();
        FragmentTransaction fragmentTransaction=fragmentManager.beginTransaction();
        fragmentTransaction.replace(R.id.fragment_content,historyFragment);
        fragmentTransaction.commit();*/
}
